﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_NhatKyChungTu : Form
    {
        private object _STATIC_VSlist_MouseDown_20211C12813D_r;
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvTaiKhoanCo")]
        private ADVAccount _AdvTaiKhoanCo;
        [AccessedThroughProperty("AdvTaiKhoanNo")]
        private ADVAccount _AdvTaiKhoanNo;
        [AccessedThroughProperty("CboLoaiChungTu")]
        private ComboBox _CboLoaiChungTu;
        [AccessedThroughProperty("CmdXem")]
        private Button _CmdXem;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("mnChiTietChungTu")]
        private ToolStripMenuItem _mnChiTietChungTu;
        [AccessedThroughProperty("mnSoCaiChiTietTKCo")]
        private ToolStripMenuItem _mnSoCaiChiTietTKCo;
        [AccessedThroughProperty("mnSoCaiChiTietTKNo")]
        private ToolStripMenuItem _mnSoCaiChiTietTKNo;
        [AccessedThroughProperty("mnTuyChon")]
        private ContextMenuStrip _mnTuyChon;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("Panel2")]
        private Panel _Panel2;
        [AccessedThroughProperty("TxtDenNgay")]
        private DateTimePicker _TxtDenNgay;
        [AccessedThroughProperty("TxtTuNgay")]
        private DateTimePicker _TxtTuNgay;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        private IContainer components;
        private bool IsLoaded;
        private clsChungTuTongHop objTH;
        private DataTable pData;

        public Frm_NhatKyChungTu()
        {
            base.Load += new EventHandler(this.Frm_NhatKyChungTu_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objTH = new clsChungTuTongHop();
            this.IsLoaded = false;
            this.InitializeComponent();
        }

        private void CboLoaiChungTu_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.LoadData();
        }

        private void CmdXem_Click(object sender, EventArgs e)
        {
            this.LoadData();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_NhatKyChungTu_Load(object sender, EventArgs e)
        {
            string commandText = " SELECT Ma, DienGiai FROM HT_LoaiChungTu Union SELECT '' As Ma, '' As DienGiai FROM HT_LoaiChungTu ORDER BY DienGiai ";
            DataTable table = DBHelper.ExecuteDataset(modGeneral.ConnectionString, CommandType.Text, commandText, new IDataParameter[0]).Tables[0];
            this.CboLoaiChungTu.DataSource = table;
            this.CboLoaiChungTu.ValueMember = "Ma";
            this.CboLoaiChungTu.DisplayMember = "DienGiai";
            this.TxtTuNgay.Text = "01/" + LVYModule.sRight("00" + Conversions.ToString(DateAndTime.Month(DateAndTime.Today)), 2) + "/" + Conversions.ToString(DateAndTime.Year(DateAndTime.Today));
            this.IsLoaded = true;
            this.LoadData();
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_NhatKyChungTu));
            this.Panel1 = new Panel();
            this.CmdXem = new Button();
            this.Label4 = new Label();
            this.Label3 = new Label();
            this.Label2 = new Label();
            this.CboLoaiChungTu = new ComboBox();
            this.Label1 = new Label();
            this.TxtDenNgay = new DateTimePicker();
            this.Label13 = new Label();
            this.TxtTuNgay = new DateTimePicker();
            this.Panel2 = new Panel();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.mnTuyChon = new ContextMenuStrip(this.components);
            this.mnChiTietChungTu = new ToolStripMenuItem();
            this.mnSoCaiChiTietTKNo = new ToolStripMenuItem();
            this.mnSoCaiChiTietTKCo = new ToolStripMenuItem();
            this.AdvTaiKhoanCo = new ADVAccount();
            this.AdvTaiKhoanNo = new ADVAccount();
            this.Panel1.SuspendLayout();
            this.VSlist.BeginInit();
            this.mnTuyChon.SuspendLayout();
            this.SuspendLayout();
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel1.Controls.Add(this.CmdXem);
            this.Panel1.Controls.Add(this.Label4);
            this.Panel1.Controls.Add(this.AdvTaiKhoanCo);
            this.Panel1.Controls.Add(this.Label3);
            this.Panel1.Controls.Add(this.AdvTaiKhoanNo);
            this.Panel1.Controls.Add(this.Label2);
            this.Panel1.Controls.Add(this.CboLoaiChungTu);
            this.Panel1.Controls.Add(this.Label1);
            this.Panel1.Controls.Add(this.TxtDenNgay);
            this.Panel1.Controls.Add(this.Label13);
            this.Panel1.Controls.Add(this.TxtTuNgay);
            this.Panel1.Dock = DockStyle.Top;
            Point point = new Point(0, 0);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            Size size = new Size(0x3d8, 0x30);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0;
            this.CmdXem.BackgroundImage = ACCOUNTING.My.Resources.Resources.report;
            this.CmdXem.BackgroundImageLayout = ImageLayout.None;
            point = new Point(0x359, 0x16);
            this.CmdXem.Location = point;
            this.CmdXem.Name = "CmdXem";
            size = new Size(0x41, 0x17);
            this.CmdXem.Size = size;
            this.CmdXem.TabIndex = 0x4a;
            this.CmdXem.Text = "Load";
            this.CmdXem.UseVisualStyleBackColor = true;
            this.Label4.AutoSize = true;
            this.Label4.BackColor = Color.Transparent;
            this.Label4.ForeColor = Color.Black;
            point = new Point(0x249, 6);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(70, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x49;
            this.Label4.Text = "T\x00e0i khoản c\x00f3";
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            this.Label3.ForeColor = Color.Black;
            point = new Point(0x14f, 6);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(70, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x47;
            this.Label3.Text = "T\x00e0i khoản nợ";
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            this.Label2.ForeColor = Color.Black;
            point = new Point(0xaf, 6);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x48, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x45;
            this.Label2.Text = "Loại chứng từ";
            this.CboLoaiChungTu.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiChungTu.FormattingEnabled = true;
            point = new Point(0xb2, 0x17);
            this.CboLoaiChungTu.Location = point;
            this.CboLoaiChungTu.Name = "CboLoaiChungTu";
            size = new Size(0x9c, 0x15);
            this.CboLoaiChungTu.Size = size;
            this.CboLoaiChungTu.TabIndex = 0x44;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            this.Label1.ForeColor = Color.Black;
            point = new Point(0x5c, 6);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x35, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x43;
            this.Label1.Text = "Đến ng\x00e0y";
            this.TxtDenNgay.Format = DateTimePickerFormat.Custom;
            point = new Point(90, 0x17);
            this.TxtDenNgay.Location = point;
            this.TxtDenNgay.Name = "TxtDenNgay";
            size = new Size(0x55, 20);
            this.TxtDenNgay.Size = size;
            this.TxtDenNgay.TabIndex = 0x42;
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            this.Label13.ForeColor = Color.Black;
            point = new Point(5, 6);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x2e, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x41;
            this.Label13.Text = "Từ ng\x00e0y";
            this.TxtTuNgay.Format = DateTimePickerFormat.Custom;
            point = new Point(4, 0x17);
            this.TxtTuNgay.Location = point;
            this.TxtTuNgay.Name = "TxtTuNgay";
            size = new Size(0x53, 20);
            this.TxtTuNgay.Size = size;
            this.TxtTuNgay.TabIndex = 0x40;
            this.Panel2.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel2.Dock = DockStyle.Bottom;
            point = new Point(0, 0x232);
            this.Panel2.Location = point;
            this.Panel2.Name = "Panel2";
            size = new Size(0x3d8, 0x21);
            this.Panel2.Size = size;
            this.Panel2.TabIndex = 1;
            this.VSlist.AllowEditing = false;
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.XpThemes;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.ContextMenuStrip = this.mnTuyChon;
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.FocusRect = FocusRectEnum.None;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 0x30);
            this.VSlist.Location = point;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            this.VSlist.SelectionMode = SelectionModeEnum.Row;
            size = new Size(0x3d8, 0x202);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0x19;
            this.VSlist.VisualStyle = VisualStyle.Office2007Blue;
            this.mnTuyChon.Items.AddRange(new ToolStripItem[] { this.mnChiTietChungTu, this.mnSoCaiChiTietTKNo, this.mnSoCaiChiTietTKCo });
            this.mnTuyChon.Name = "mnTuyChon";
            size = new Size(0xd6, 70);
            this.mnTuyChon.Size = size;
            this.mnChiTietChungTu.Name = "mnChiTietChungTu";
            size = new Size(0xd5, 0x16);
            this.mnChiTietChungTu.Size = size;
            this.mnChiTietChungTu.Text = "Chi tiết chứng từ";
            this.mnSoCaiChiTietTKNo.Name = "mnSoCaiChiTietTKNo";
            size = new Size(0xd5, 0x16);
            this.mnSoCaiChiTietTKNo.Size = size;
            this.mnSoCaiChiTietTKNo.Text = "Sổ c\x00e1i chi tiết t\x00e0i khoản nợ";
            this.mnSoCaiChiTietTKNo.Visible = false;
            this.mnSoCaiChiTietTKCo.Name = "mnSoCaiChiTietTKCo";
            size = new Size(0xd5, 0x16);
            this.mnSoCaiChiTietTKCo.Size = size;
            this.mnSoCaiChiTietTKCo.Text = "Sổ c\x00e1i chi tiết t\x00e0i khoản c\x00f3";
            this.mnSoCaiChiTietTKCo.Visible = false;
            this.AdvTaiKhoanCo.Conditions = "";
            this.AdvTaiKhoanCo.DefaultValue = "";
            this.AdvTaiKhoanCo.FieldNameFilter = "";
            this.AdvTaiKhoanCo.KeyFilter = "";
            point = new Point(0x24b, 0x17);
            this.AdvTaiKhoanCo.Location = point;
            Padding padding = new Padding(0);
            this.AdvTaiKhoanCo.Margin = padding;
            this.AdvTaiKhoanCo.Name = "AdvTaiKhoanCo";
            this.AdvTaiKhoanCo.OnlyDigit = false;
            this.AdvTaiKhoanCo.ReadOnly = false;
            size = new Size(0xf7, 20);
            this.AdvTaiKhoanCo.Size = size;
            this.AdvTaiKhoanCo.TabIndex = 0x48;
            this.AdvTaiKhoanCo.UpperText = true;
            this.AdvTaiKhoanCo.Value = "";
            this.AdvTaiKhoanCo.WithCode = 80;
            this.AdvTaiKhoanNo.Conditions = "";
            this.AdvTaiKhoanNo.DefaultValue = "";
            this.AdvTaiKhoanNo.FieldNameFilter = "";
            this.AdvTaiKhoanNo.KeyFilter = "";
            point = new Point(0x151, 0x17);
            this.AdvTaiKhoanNo.Location = point;
            padding = new Padding(0);
            this.AdvTaiKhoanNo.Margin = padding;
            this.AdvTaiKhoanNo.Name = "AdvTaiKhoanNo";
            this.AdvTaiKhoanNo.OnlyDigit = false;
            this.AdvTaiKhoanNo.ReadOnly = false;
            size = new Size(0xf7, 20);
            this.AdvTaiKhoanNo.Size = size;
            this.AdvTaiKhoanNo.TabIndex = 70;
            this.AdvTaiKhoanNo.UpperText = true;
            this.AdvTaiKhoanNo.Value = "";
            this.AdvTaiKhoanNo.WithCode = 80;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x3d8, 0x253);
            this.ClientSize = size;
            this.Controls.Add(this.VSlist);
            this.Controls.Add(this.Panel2);
            this.Controls.Add(this.Panel1);
            this.Name = "Frm_NhatKyChungTu";
            this.ShowIcon = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "NHAT KY CHUNG TU";
            this.Panel1.ResumeLayout(false);
            this.Panel1.PerformLayout();
            this.VSlist.EndInit();
            this.mnTuyChon.ResumeLayout(false);
            this.ResumeLayout(false);
        }

        public void LoadData()
        {
            if (this.IsLoaded)
            {
                string strConditions = " 1 = 1 ";
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiChungTu.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
                {
                    strConditions = strConditions + " And SubString(KhoaChungTu, 3, 2 ) = '" + this.CboLoaiChungTu.SelectedValue.ToString().Trim() + "' ";
                }
                if (this.AdvTaiKhoanNo.Value.Trim() != "")
                {
                    strConditions = strConditions + " And KhoaTaiKhoanNo = '" + this.AdvTaiKhoanNo.Value + "'";
                }
                if (this.AdvTaiKhoanCo.Value.Trim() != "")
                {
                    strConditions = strConditions + " And KhoaTaiKhoanCo = '" + this.AdvTaiKhoanCo.Value + "'";
                }
                this.pData = this.objTH.GetNhatKyChungTu(LVYModule.Date2Char(this.TxtTuNgay.Text), LVYModule.Date2Char(this.TxtDenNgay.Text), modGeneral.H_CLIENT, strConditions);
                if (this.pData != null)
                {
                    this.VSlist.DataSource = this.pData;
                    C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                    vSlist.Cols[0].Visible = true;
                    vSlist.Cols[1].Width = 100;
                    vSlist.Cols[2].Width = 80;
                    vSlist.Cols[3].Width = 80;
                    vSlist.Cols[4].Width = 80;
                    vSlist.Cols[5].Width = 80;
                    vSlist.Cols[6].Width = 80;
                    vSlist.Cols[7].Width = 100;
                    vSlist[0, 1] = modGeneral.Tranlated("Số chứng từ", "");
                    vSlist[0, 2] = modGeneral.Tranlated("Ng\x00e0y", "");
                    vSlist[0, 3] = modGeneral.Tranlated("Số h\x00f3a đơn", "");
                    vSlist[0, 4] = modGeneral.Tranlated("T\x00e0i khoản nợ", "");
                    vSlist[0, 5] = modGeneral.Tranlated("T\x00e0i khoản c\x00f3", "");
                    vSlist[0, 6] = modGeneral.Tranlated("Loại tiền", "");
                    vSlist[0, 7] = modGeneral.Tranlated("Số ph\x00e1t sinh", "");
                    vSlist[0, 8] = modGeneral.Tranlated("Diễn giải", "");
                    vSlist.Cols[7].DataType = System.Type.GetType("System.Decimal");
                    vSlist.Cols[7].Format = modGeneral.H_FORMATNUMBER;
                    if (vSlist.Cols[8].Width < 250)
                    {
                        vSlist.Cols[8].Width = 250;
                    }
                    vSlist = null;
                }
            }
        }

        private void mnChiTietChungTu_Click(object sender, EventArgs e)
        {
            if ((this.VSlist.Rows.Count != 1) && (this.VSlist.Row > 0))
            {
                this.ShowChungTu(Conversions.ToString(this.VSlist[this.VSlist.Row, 0]));
            }
        }

        public void ShowChungTu(string pKhoa)
        {
            string str = LVYModule.sMid(pKhoa, 3, 2);
            string str2 = str;
            if (str2 == "TT")
            {
                MyProject.Forms.Frm_TraTruocNguoiBan.Dispose();
                MyProject.Forms.Frm_TraTruocNguoiBan.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_TraTruocNguoiBan.ShowDialog();
            }
            else if (str2 == "TU")
            {
                MyProject.Forms.Frm_KhachHangUngTruoc.Dispose();
                MyProject.Forms.Frm_KhachHangUngTruoc.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_KhachHangUngTruoc.ShowDialog();
            }
            else if (str2 == "DV")
            {
                MyProject.Forms.Frm_HoaDonBanDichVu.Dispose();
                MyProject.Forms.Frm_HoaDonBanDichVu.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_HoaDonBanDichVu.ShowDialog();
            }
            else if (str2 == "SE")
            {
                MyProject.Forms.Frm_HoaDonMuaDichVu.Dispose();
                MyProject.Forms.Frm_HoaDonMuaDichVu.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_HoaDonMuaDichVu.ShowDialog();
            }
            else if (str2 == "CP")
            {
                MyProject.Forms.Frm_ChiPhiMuaHang.Dispose();
                MyProject.Forms.Frm_ChiPhiMuaHang.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_ChiPhiMuaHang.ShowDialog();
            }
            else if (str2 == "KT")
            {
                MyProject.Forms.Frm_KhachHangTraHang.Dispose();
                MyProject.Forms.Frm_KhachHangTraHang.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_KhachHangTraHang.ShowDialog();
            }
            else if (str2 == "TH")
            {
                MyProject.Forms.Frm_TraHangNhaCungCap.Dispose();
                MyProject.Forms.Frm_TraHangNhaCungCap.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_TraHangNhaCungCap.ShowDialog();
            }
            else if (str2 == "GH")
            {
                MyProject.Forms.Frm_PhieuGiaoHang.Dispose();
                MyProject.Forms.Frm_PhieuGiaoHang.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_PhieuGiaoHang.ShowDialog();
            }
            else if (str2 == "XB")
            {
                MyProject.Forms.Frm_XuatBan.Dispose();
                MyProject.Forms.Frm_XuatBan.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_XuatBan.ShowDialog();
            }
            else if (str2 == "PT")
            {
                MyProject.Forms.Frm_PhieuThu.Dispose();
                MyProject.Forms.Frm_PhieuThu.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_PhieuThu.ShowDialog();
            }
            else if (str2 == "BC")
            {
                MyProject.Forms.Frm_BaoCoNganHang.Dispose();
                MyProject.Forms.Frm_BaoCoNganHang.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_BaoCoNganHang.ShowDialog();
            }
            else if (str2 == "AR")
            {
                MyProject.Forms.Frm_PhaiThu.Dispose();
                MyProject.Forms.Frm_PhaiThu.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_PhaiThu.ShowDialog();
            }
            else if (str2 == "AP")
            {
                MyProject.Forms.Frm_PhaiTra.Dispose();
                MyProject.Forms.Frm_PhaiTra.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_PhaiTra.ShowDialog();
            }
            else if (str2 == "GL")
            {
                MyProject.Forms.Frm_TongHop.Dispose();
                MyProject.Forms.Frm_TongHop.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_TongHop.ShowDialog();
            }
            else if (str2 == "NK")
            {
                MyProject.Forms.Frm_NhapKho.Dispose();
                MyProject.Forms.Frm_NhapKho.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_NhapKho.ShowDialog();
            }
            else if (str2 == "IM")
            {
                MyProject.Forms.Frm_NhapKhau.Dispose();
                MyProject.Forms.Frm_NhapKhau.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_NhapKhau.ShowDialog();
            }
            else if (str2 == "PC")
            {
                MyProject.Forms.Frm_PhieuChi.Dispose();
                MyProject.Forms.Frm_PhieuChi.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_PhieuChi.ShowDialog();
            }
            else if (str2 == "BN")
            {
                MyProject.Forms.Frm_BaoNoNganHang.Dispose();
                MyProject.Forms.Frm_BaoNoNganHang.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_BaoNoNganHang.ShowDialog();
            }
            else if (str2 == "GL")
            {
                MyProject.Forms.Frm_TongHop.Dispose();
                MyProject.Forms.Frm_TongHop.cFrmKhoa = pKhoa;
                MyProject.Forms.Frm_TongHop.ShowDialog();
            }
        }

        private void TxtTuNgay_LostFocus(object sender, EventArgs e)
        {
            if (LVYModule.sRight(this.TxtTuNgay.Text, 7) != LVYModule.sRight(this.TxtDenNgay.Text, 7))
            {
                this.TxtDenNgay.Text = DateTime.DaysInMonth(Conversions.ToInteger(LVYModule.sRight(this.TxtTuNgay.Text, 4)), Conversions.ToInteger(LVYModule.sMid(this.TxtTuNgay.Text, 4, 2))).ToString() + "/" + LVYModule.sRight(this.TxtTuNgay.Text, 7);
            }
        }

        private void VSlist_MouseDown(object sender, MouseEventArgs e)
        {
            if (this.VSlist.MouseRow > 0)
            {
                this._STATIC_VSlist_MouseDown_20211C12813D_r = this.VSlist.MouseRow;
                this.VSlist.Select(Conversions.ToInteger(this._STATIC_VSlist_MouseDown_20211C12813D_r), 0);
            }
        }

        internal virtual ADVAccount AdvTaiKhoanCo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTaiKhoanCo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTaiKhoanCo = value;
            }
        }

        internal virtual ADVAccount AdvTaiKhoanNo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTaiKhoanNo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTaiKhoanNo = value;
            }
        }

        internal virtual ComboBox CboLoaiChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiChungTu_SelectedIndexChanged);
                if (this._CboLoaiChungTu != null)
                {
                    this._CboLoaiChungTu.SelectedIndexChanged -= handler;
                }
                this._CboLoaiChungTu = value;
                if (this._CboLoaiChungTu != null)
                {
                    this._CboLoaiChungTu.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual Button CmdXem
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdXem;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdXem_Click);
                if (this._CmdXem != null)
                {
                    this._CmdXem.Click -= handler;
                }
                this._CmdXem = value;
                if (this._CmdXem != null)
                {
                    this._CmdXem.Click += handler;
                }
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual ToolStripMenuItem mnChiTietChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._mnChiTietChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.mnChiTietChungTu_Click);
                if (this._mnChiTietChungTu != null)
                {
                    this._mnChiTietChungTu.Click -= handler;
                }
                this._mnChiTietChungTu = value;
                if (this._mnChiTietChungTu != null)
                {
                    this._mnChiTietChungTu.Click += handler;
                }
            }
        }

        internal virtual ToolStripMenuItem mnSoCaiChiTietTKCo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._mnSoCaiChiTietTKCo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._mnSoCaiChiTietTKCo = value;
            }
        }

        internal virtual ToolStripMenuItem mnSoCaiChiTietTKNo
        {
            [DebuggerNonUserCode]
            get
            {
                return this._mnSoCaiChiTietTKNo;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._mnSoCaiChiTietTKNo = value;
            }
        }

        internal virtual ContextMenuStrip mnTuyChon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._mnTuyChon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._mnTuyChon = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual Panel Panel2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel2 = value;
            }
        }

        internal virtual DateTimePicker TxtDenNgay
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDenNgay;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDenNgay = value;
            }
        }

        internal virtual DateTimePicker TxtTuNgay
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTuNgay;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtTuNgay_LostFocus);
                if (this._TxtTuNgay != null)
                {
                    this._TxtTuNgay.LostFocus -= handler;
                }
                this._TxtTuNgay = value;
                if (this._TxtTuNgay != null)
                {
                    this._TxtTuNgay.LostFocus += handler;
                }
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                MouseEventHandler handler = new MouseEventHandler(this.VSlist_MouseDown);
                if (this._VSlist != null)
                {
                    this._VSlist.MouseDown -= handler;
                }
                this._VSlist = value;
                if (this._VSlist != null)
                {
                    this._VSlist.MouseDown += handler;
                }
            }
        }
    }
}

